-
-
Notifications
You must be signed in to change notification settings - Fork 195
LONDON | ITP_MAY | Mirabel Adom | Module-Structuring-and-Testing-Data | Sprint-2 #655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not practice "committing files one by one, on purpose, and for a reason"?
In VSCode, you can select which file to stage, and commit only the staged file.
See: https://www.youtube.com/watch?v=z5jZ9lrSpqk&t=705 (At around 12:50 minute marker, the video shows how to stage a single file).
} | ||
const heightSquared = height * height; | ||
return `${(weight / heightSquared).toFixed(1)}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What type of value do you expect the function to return? A number or a string?
Does your function return the type of value you expect it to return?
const penceStringWithoutTrailingP = penceString.substring( | ||
0, | ||
penceString.length - 1 | ||
); | ||
|
||
const paddedPenceNumberString = penceStringWithoutTrailingP.padStart(3, "0"); | ||
const pounds = paddedPenceNumberString.substring( | ||
0, | ||
paddedPenceNumberString.length - 2 | ||
); | ||
|
||
const pence = paddedPenceNumberString | ||
.substring(paddedPenceNumberString.length - 2) | ||
.padEnd(2, "0"); | ||
|
||
console.log(`£${pounds}.${pence}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these code still needed?
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
In this pull request, I've focused on identifying key errors in the code and applying effective debugging strategies. Additionally, I’ve implemented functions and deepened my understanding of code interpretation.
Questions
Ask any questions you have for your reviewer.